module.exports = {

    // publicPath: process.env.NODE_ENV === 'production'
    // ? '/business/'
    // : '/business/',

    // productionSourceMap: false,

    devServer: {
        port: 3001,
        proxy: {
            '/newApi': {
                target: 'http://192.168.1.18:8080',
                changeOrigin: true,
                ws: true,
                pathRewrite: {
                    '^/newApi': ''
                }
            },
            '/ReportApi': { 
                target: 'http://127.0.0.1:8000',
                changeOrigin: true,
                ws: true,
                pathRewrite: {
                    '^/ReportApi': ''
                }
            }
        }
    },

    pluginOptions: {
        // foo: {
        //   // 插件可以作为 `options.pluginOptions.foo` 访问这些选项。
        // }
    },
     //保留空白字符，保留&nbsp;&emsp;不被过滤
    chainWebpack: config => {
        config.module
        .rule('vue')
            .use('vue-loader')
                .tap(args => {
                    args.compilerOptions.whitespace = 'preserve'
                })
    }
}
